package com.juzi.wopu.query;

import org.apache.commons.lang3.StringUtils;

public class CartShelfQuery extends BaseQuery{
	
	private String sProductName;
	
	private Long companyCode;
			
	private Long iType;

	public CartShelfQuery() {
		super("CartShelf");
	}
	
	@Override
	protected void addWhere() {
		if (StringUtils.isNotBlank(sProductName)) {
			AddWhere("o.sProductName like ?", "%" + sProductName + "%");
		}
		
		if (companyCode!=null) {
			AddWhere("o.iCompany = ?", companyCode);
		}
		
		if (iType!=null && iType!=-1) {
			AddWhere("o.sysCode.iId = ?", iType);
		}
	}

	public String getsProductName() {
		return sProductName;
	}

	public void setsProductName(String sProductName) {
		this.sProductName = sProductName;
	}

	public String getSProductName() {
		return sProductName;
	}

	public void setSProductName(String sProductName) {
		this.sProductName = sProductName;
	}

	public Long getiType() {
		return iType;
	}

	public void setiType(Long iType) {
		this.iType = iType;
	}
	
	public Long getIType() {
		return iType;
	}

	public void setIType(Long iType) {
		this.iType = iType;
	}

	public Long getCompanyCode() {
		return companyCode;
	}

	public void setCompanyCode(Long companyCode) {
		this.companyCode = companyCode;
	}
}
